import http from "../request";
const apibase = "/api/SemiMGoodsRecord";

//获取精华液库存
var getDistributeSemiMGoodsRecords = function (data) {
    return new Promise((resolve, reject) => {
        http
            .post(apibase + `/GetDistributeSemiMGoodsRecords`, data)
            .then((res) => {
                resolve(res);
            })
            .catch((error) => {
                reject(error);
            });
    });
};

//新增数据
var insSemiMGoodsDistribute = function (data) {
    return new Promise((resolve, reject) => {
        http
            .post(apibase + `/InsSemiMGoodsDistribute`, data)
            .then((res) => {
                resolve(res);
            })
            .catch((error) => {
                reject(error);
            });
    });
};

//修改数据
var updSemiMGoodsDistribute = function (data) {
    return new Promise((resolve, reject) => {
        http
            .post(apibase + `/UpdSemiMGoodsDistribute`, data)
            .then((res) => {
                resolve(res);
            })
            .catch((error) => {
                reject(error);
            });
    });
};

//删除数据
var delSemiMGoodsDistribute = function (data) {
    return new Promise((resolve, reject) => {
        http
            .post(apibase + `/DelSemiMGoodsDistribute`, data)
            .then((res) => {
                resolve(res);
            })
            .catch((error) => {
                reject(error);
            });
    });
};



//批量删除数据
var delSemiMGoodsDistributeList = function (data) {
    return new Promise((resolve, reject) => {
        http
            .post(apibase + `/DelSemiMGoodsDistributeList`, data)
            .then((res) => {
                resolve(res);
            })
            .catch((error) => {
                reject(error);
            });
    });
};
export {
    getDistributeSemiMGoodsRecords,
    insSemiMGoodsDistribute,
    updSemiMGoodsDistribute,
    delSemiMGoodsDistribute,
    delSemiMGoodsDistributeList
};
